import 'package:flutter_nb_net/flutter_net.dart';

class FenceListResp extends BaseNetModel {
  int? code;
  String? msg;
  List<FenceData>? data;

  FenceListResp({this.code, this.msg, this.data});

  @override
  fromJson(Map<String, dynamic> json) {
    return FenceListResp(
      code: json['code'],
      msg: json['msg'],
      data: json['data'] != null ? List<FenceData>.from(json['data'].map((x) => FenceData().fromJson(x))) : null,
    );
  }
}

class FenceData extends BaseNetModel {

  String? id;
  String? deviceId;
  String? name;
  double? radius;
  double? longitude;
  double? latitude;
  String? createTime;
  String? updateTime;

  FenceData({this.id, this.deviceId, this.name, this.radius, this.longitude, this.latitude, this.createTime, this.updateTime});

  @override
  fromJson(Map<String, dynamic> json) {
    return FenceData(
      id: json['id'],
      deviceId: json['deviceId'],
      name: json['name'],
      radius: json['radius'],
      longitude: json['longitude'],
      latitude: json['latitude'],
      createTime: json['createTime'],
      updateTime: json['updateTime'],
    );
  }
}